package com.woniuxy02;

import java.util.ArrayList;
import java.util.Collection;

public class Test03 {
    public static void main(String[] args) {
        Collection<String> s1=new ArrayList<String>();
        s1.add("aaa");
        s1.add("bbb");
        Collection<String> s2=new ArrayList<String>();
        s2.addAll(s1);
        System.out.println(s1);
        System.out.println(s2);
        //清空集合中的元素
//        s1.clear();
//        System.out.println(s1);
//        System.out.println(s2);
        System.out.println(s1.contains("aaa"));
        System.out.println(s1.contains("ccc"));
    }
}
